import React from 'react';
import { Modal, Button } from 'choerodon-ui/pro';
import ModalDetail from './ModalDetail';
import ModalFooter from './ModalFooter';


const modalKey = Modal.key();

const ModalWithFooter: React.FC = () => {
  const openModal = () => {
    Modal.open({
      key: modalKey,
      title: '自定义footer',
      children: <ModalDetail />,
      footer: ModalFooter,
      okText: '确定',
    });
  };

  return (
    <Button onClick={openModal}>
      自定义底部
    </Button>
  );
};

export default ModalWithFooter;